import java.util.Arrays;
import java.util.Scanner;
import java.lang.Math;
public class test {
    /*public static void main1(String[] args) {//九九乘法表
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        for(int i=1;i<=n;i++){
            for(int j=1;j<=i;j++){
                System.out.print(i+"*"+j+"="+i*j+" ");
            }
            System.out.println();
        }
    }


    public static void main(String[] args) {//开密码门
        int s= 123;
        System.out.println("输入密码");
        Scanner scanner= new Scanner(System.in);
        for(int i=0;i<3;i++) {
            int a = scanner.nextInt();
            if (a != s) {
                System.out.println("密码错误");
            } else if(a==s){
                System.out.println("芝麻开门");
            }
        }
    }


    public static void main(String[] args) {//判断二进制有几个1
        Scanner scanner= new Scanner(System.in);
        int a = scanner.nextInt();
        int n=0;
        for( n=0;a>0;a>>=1){
            n+=a&1;  //  n&n-1判断是不是2的次方;
        }
        System.out.println(n);
    }


    public static void main(String[] args) {//拿出二进制的奇位和偶数位
        Scanner scanner= new Scanner(System.in);
        int a = scanner.nextInt();
        int i;
        for(i=31;i>=0;i-=2){
            System.out.print((a>>i)&1);
        }
        System.out.println();
        for(i=30;i>=0;i-=2){
            System.out.print((a>>i)&1);
        }
    }


    public static void main(String[] args) {//公约数
        Scanner scanner= new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        if(a<b){
            int temp=0;
            temp=a;
            a=b;
            b=temp;
        }
        int a1=a;
        int b1=b;
        int c=a%b;
        while (c!=0){
            a=b;
            b=c;
            c=a%b;
        }
        System.out.println("最大公约数为"+b);
        System.out.println("最小公倍数为"+a1*b1/b);
    }


    public static void main(String[] args) {//水仙花数
        for(int i=1;i<1000;i++){
            int sum=0;
            for(int j=10;j<=100;j*=10){
                sum+=(i/j)*(i%j);
            }
            if(sum==i){
                System.out.println(i);
            }
        }
    }


    public static void main(String[] args) {//水仙花数
        Scanner scanner=new Scanner(System.in);
        int num=scanner.nextInt();
        int count=0;
        int temp=num;
        int num1=num;
        while (num!=0){
            count++;
            num/=10;
        }
        int sum=0;
        while(temp!=0){
            sum+=Math.pow(temp%10,count);
            temp/=10;
        }
        if(sum==num1){
            System.out.println("ok");
        }
    }


    public static void main(String[] args) {//素数
        Scanner scanner=new Scanner(System.in);
        int num=scanner.nextInt();
        int i=2;
        while(i<num){
            if(num%i==0){
                System.out.println("不是素数");
                break;
            }
            else{
                i++;
            }
        }
        if(i==num){
            System.out.println(num+"是素数");
        }
    }


    public static void main(String[] args) {//判断素数
        int i,j;
        for( i=3;i<=100;i++){
            for(j=2;j<=100;j++){
                if(i%j==0){
                    break;
                }
            }
            if(j==i){
                System.out.println("素数是"+i);
            }
        }
    }



    public static void main(String[] args) {//判断闰年
        for(int year=1000;year<=2000;year++){
            if(((year%4==0)&&(year%100!=0))||year%400==0){
                System.out.print(year+" ");
            }
        }
    }


    public static int sum(int a, int b) {//方法名重载
        return a + b;
    }

    public static double sum(double a, double b) {
        return a + b;
    }

    public static double sum(int a, double b) {
        return a + b;
    }

    public static void main(String[] args) {
        System.out.println(sum(1, 2));
        System.out.println(sum(1, 1.44));
        System.out.println(sum(1.2, 1.3));
    }

    public static int func(int n) {//斐波那契数列
        if(n==1){
            return 1;
        }
        else  if(n==0){
            return 0;
        }
        return func(n-1)+func(n-2);
    }
    public static void main(String[] args) {
        System.out.println(func(3));
    }

    public static int sum(int n) {//递归打印123的每一位之和
        if(n<10){
            return n;
        }
        int temp=n%10+sum(n/10);
        return temp;
    }
    public static void main(String[] args) {
        System.out.println(sum(134));
    }

    public static void fun(int n) {//递归打印1234
        if(n<10){
            System.out.println(n);
            return ;
        }
        fun(n/10);
        System.out.println(n%10);
    }
    public static void main(String[] args){
        fun(1234);
    }


    public static int fun(int n) {  //求10以内的和
        if(n==1){
            return 1;
        }
        int temp=n+fun(n-1);
        return temp;
    }

    public static void main(String[] args) {
        System.out.println(fun(10));
    }


    public static int fun(int n) {//求n的阶乘
        if(n==1){
            return 1;
        }
        int temp=n*fun(n-1);
        return temp;
    }
    public static void main(String[] args) {
        System.out.println(fun(4));
    }


    public static int[] transform(int[] a) {//数组引用的指向
        for(int i=0;i<a.length;i++){
            a[i]=a[i]*2;
        }
        return a;
    }
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        int[] arr=new int[3];
        for(int i=0;i<arr.length;i++){
            arr[i]=input.nextInt();
        }
        //int[]arr2=arr;//引用的数组都具有一样的哈希值，指向的数据都一样会随之改变
        transform(arr);
        System.out.println(Arrays.toString(arr));
       //System.out.println(Arrays.toString(arr2));
    }

    public static void toString(int[] a){ //手动实现toString
        String str="[";
        for(int i=0;i<a.length;i++){
            str+=a[i];
        if(i!=a.length-1){
                str=str+","+" ";
            }
        }
        str+="]";
        System.out.println(str);
    }


    public static void main(String[] args) {   //实现数组/字符串的拷贝
        Scanner input=new Scanner(System.in);
        int[] arr=new int[3];
        for(int i=0;i<arr.length;i++){
            arr[i]=input.nextInt();
        }
        toString(arr);
        int[] arr2=arr.clone();
        int[] arr3=Arrays.copyOf(arr,arr.length);
        int[] arr4=new int[arr.length];
        System.arraycopy(arr,0,arr4,0,arr.length);
        System.out.println(Arrays.toString(arr));
        System.out.println(Arrays.toString(arr3));
        System.out.println(Arrays.toString(arr4));
    }*/
}

